﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.IO;

namespace ggprot
{
    public class GGMultiloginInfo : GGHeader
    {
        private int count;
        private GGMultiloginItem[] items;

        public GGMultiloginItem[] Items
        {
            get { return items; }
        }

        public int Count
        {
            get { return count; }
            set { count = value; }
        }

        public GGMultiloginInfo(GGHeader header)
        {
            this.Type = header.Type;
            this.Length = header.Length;
        }

        public override void Read(NetworkStream stream)
        {
            BinaryReader reader = new BinaryReader(stream);

            count = reader.ReadInt32();
            items = new GGMultiloginItem[count];

            for (int i = 0; i < count; i++)
            {
                items[i] = new GGMultiloginItem();
                items[i].Read(stream);
            }
        }
    }
}
